package com.way.Java多线程编程核心技术v2.chapter02_对象及变量的并发访问._2_1_synchronized同步方法.holdsLock方法的使用;

/**
 * @author 魏彪
 */
public class Test {
    public static void main(String[] args) {
        System.out.println("A " + Thread.holdsLock(Test.class));
        synchronized (Test.class) {
            System.out.println("B " + Thread.holdsLock(Test.class));
        }
        System.out.println("C " + Thread.holdsLock(Test.class));
    }
}
